#include <UnitFormat.h>
#include <Unit.h>

void UnitFormatSeq::unitOutput(std::ostream& out, const UnitAmount& amount,const Unit & unit) const
{
  unit.formatUnitSets(out,amount);
}

UnitFormat& UnitFormatSeq::unitFormat()
{
  static UnitFormatSeq unitFormatOutputterBySeq;
  return unitFormatOutputterBySeq;
}

UnitFormatSeq::UnitFormatSeq() 
{
}

void UnitFormatMinUnit::unitOutput(std::ostream& out, const UnitAmount& amount,const Unit & unit) const
{
  out << unit.convert2MinUnit(amount) << " " << unit.getMinUnit();
}

UnitFormat& UnitFormatMinUnit::unitFormat()
{
  static UnitFormatMinUnit unitFormatOutputOnlyMinUnit;
  return unitFormatOutputOnlyMinUnit;
}

UnitFormatMinUnit::UnitFormatMinUnit()
{
}

